package com.weibo.net;

import android.os.Bundle;
import java.util.ArrayList;
import java.util.List;

public class WeiboParameters
{
  private List<String> mKeys;
  private Bundle mParameters = new Bundle();

  public WeiboParameters()
  {
    this.mKeys = new ArrayList();
  }

  public void add(String paramString1, String paramString2)
  {
    if (this.mKeys.contains(paramString1))
      this.mParameters.putString(paramString1, paramString2);
    while (true)
    {
      return;
      this.mKeys.add(paramString1);
      this.mParameters.putString(paramString1, paramString2);
    }
  }

  public void addAll(WeiboParameters paramWeiboParameters)
  {
    int i = 0;
    while (true)
    {
      if (i >= paramWeiboParameters.size())
        return;
      add(paramWeiboParameters.getKey(i), paramWeiboParameters.getValue(i));
      ++i;
    }
  }

  public void clear()
  {
    this.mKeys.clear();
    this.mParameters.clear();
  }

  public String getKey(int paramInt)
  {
    String str;
    if ((paramInt >= 0) && (paramInt < this.mKeys.size()))
      str = (String)this.mKeys.get(paramInt);
    while (true)
    {
      return str;
      str = "";
    }
  }

  public int getLocation(String paramString)
  {
    int i;
    if (this.mKeys.contains(paramString))
      i = this.mKeys.indexOf(paramString);
    while (true)
    {
      return i;
      i = -1;
    }
  }

  public String getValue(int paramInt)
  {
    String str = (String)this.mKeys.get(paramInt);
    return this.mParameters.getString(str);
  }

  public String getValue(String paramString)
  {
    return this.mParameters.getString(paramString);
  }

  public void remove(int paramInt)
  {
    String str = (String)this.mKeys.get(paramInt);
    this.mParameters.remove(str);
    this.mKeys.remove(str);
  }

  public void remove(String paramString)
  {
    this.mKeys.remove(paramString);
    this.mParameters.remove(paramString);
  }

  public int size()
  {
    return this.mKeys.size();
  }
}